import request from '@/utils/requestUtil'

export function memberLogin(data) {
	return request({
		method: 'POST',
		url: '/sso/login',
		header: {
			'content-type': 'application/json;charset=utf-8'
		},
		 data: data
	})
}

export function memberInfo() {
	return request({
		method: 'GET',
		url: '/sso/info'
	})
}

export function uploadAvatar(data){
	return request({
		method: 'POST',
		url: '/sso/uploadAvatar',
		header: {
			'content-type': 'application/json;charset=utf-8'
		},
		 data: data
	})
}

export function getAuthCode(param){
	return request({
		method: 'GET',
		url: `/sso/getAuthCode?telephone=${param.telephone}&type=${param.type}`
	})
}

export function memberRegister(param){
	return request({
		method: 'POST',
		url: '/sso/register',
		header: {
			'content-type': 'application/json;charset=utf-8'
		},
		data: param
	})
}
